require "zmq"
require "./types.pb.rb"

context = ZMQ::Context.new(1)

puts "Opening connection for READ"
inbound = context.socket(ZMQ::PUB)
inbound.bind("tcp://127.0.0.1:9000")

while true do
	req = Xlvip::WhiteList::DbReq.new
	req.gcid="testgicd"
	req.section="testsection"
	req.business=1
	req.fsm_id=2
	req.fsm_type = 1
	str = req.serialize_to_string()
	puts "send req"
	inbound.send(str)	
	sleep(1)
end
